using System;
using System.Collections.Generic;
using System.Text;
using DTO;
using DAO;
using System.Data;
namespace BUS
{
    public enum PhieuThuTienPhatBUSResult
    {
        OK,DAOERROR
    }
    public class PhieuThuTienPhat
    {
        public static PhieuThanhLySachBUSResult Insert(DTO.PhieuThuTienPhat ph)
        {
            string sql = "insert into PhieuThuTienPhat(MaDocGia,TienNo,SoTienThu,ConLai,NguoiThu,NgayThu) values ('";
            sql += ph.MaDocGia + "','";
            sql += ph.TienNo + "','";
            sql += ph.SoTienThu + "','";
            sql += ph.ConLai + "','";
            sql += ph.NguoiThu + "','";
            sql += ph.NgayThu + "')";
            DAO.Interface dao = new DAO.PhieuThuTienPhat();
            if (dao.Insert(sql))
                return PhieuThanhLySachBUSResult.OK;
            return PhieuThanhLySachBUSResult.DAOERROR;
        }
        public static DataTable Load(string nameSP , string[] paraName , object[] paraValue)
        {
            DAO.PhieuThuTienPhat p = new DAO.PhieuThuTienPhat();
            return p.Load(nameSP , paraName , paraValue);
        }

    }
}
